import AppComponent from '../component/app/app'
import TradeInfoComponent from '../component/trade-info/trade-info'
import TradeListComponent from '../component/trade-list/trade-list'
import ModuleListComponent from '../component/module-list/module-list'
import ModuleInfoComponent from '../component/module-info/module-info'
import EventEditComponent from '../component/event-edit/event-edit'
import NotFoundComponent from '../component/not-found/not-found'

let config: Object = {
  mode: 'history',
  routes: [
    {
      path: '/view/app',
      name: 'App',
      component: AppComponent
    },

    {
      path: '/view/trade-list',
      name: 'TradeList',
      component: TradeListComponent
    },

    {
      path: '/view/trade-info/:id',
      name: 'TradeInfo',
      component: TradeInfoComponent
    },

    {
      path: '/view/module-list',
      name: 'ModuleList',
      component: ModuleListComponent
    },

    {
      path: '/view/module-info/:id',
      name: 'ModuleInfo',
      component: ModuleInfoComponent
    },

    {
      path: '/view/event-edit/:id',
      name: 'EventEdit',
      component: EventEditComponent
    },

    {
      path: '/view/not-found',
      name: 'NotFound',
      component: NotFoundComponent
    },

    {
      path: '*',
      name: 'Error',
      redirect: '/view/not-found'
    }
  ]
}

export default config
